package com.sc.nft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.ActivityBasics;
import com.sc.nft.entity.PrizeDrawActivityPool;
import com.sc.nft.entity.PrizeDrawActivityRewards;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.entity.dto.*;
import com.sc.nft.entity.vo.*;
import com.sc.nft.enums.PrizeDrawActivityPoolBonusTaypEnum;
import com.sc.nft.enums.PrizeDrawActivitySettleStatisEnum;
import com.sc.nft.enums.PrizeDrawActivityTypeEnum;

import java.util.List;

/**
 * (ActivityBasics)表服务接口
 *
 * @author 王伟成
 * @since 2023-09-12 16:33:45
 */
public interface ActivityBasicsService {


    /**
     * 新增活动基础数据
     *
     * @param activityBasicsSaveDTO
     */
    Long save(ActivityBasicsSaveDTO activityBasicsSaveDTO);


    /**
     * 开奖,对应期数进行开奖以后,直接把期数填入到数据库进行修改
     *
     * @param lotteryDrawTime
     * @param id
     */
    void lottery(String lotteryDrawTime, Long id,String lotteryDrawResult);


    /**
     * 创建活动
     *
     * @param createActivityDTO
     */
    void createActivity(CreateActivityDTO createActivityDTO);
    /**
     * 获取列表
     *
     * @param activityListDTO
     * @return
     */
    Page<ActivityBasicsVO> activityBasics(ActivityBasicsPageDTO activityListDTO);
    /**
     * 删除活动
     *
     * @param id
     */
    void deleteById(Long id);
    /**
     * 详情byId
     *
     * @param id
     * @return
     */
    ActivityBasicsDetailsVO detailsById(Long id);

    /**
     * 修改活动
     *
     * @param modificationActivityDTO
     */
    void modificationActivity(ModificationActivityDTO modificationActivityDTO);

    /**
     * 上下架
     *
     * @param id
     */
    void unmount(Long id);


    Page<ActivityBasics> page(Page page);
    /**
     * 详情
     *
     * @param id
     * @param user
     * @return
     */
    WebActivityBasicsDetailsVO webDetailsById(Long id, UserInfo user);

    /**
     * 新增瓜分活动
     * @param activityBasics
     * @param bonusType
     * @param rewardList
     */
    void addCarveUpActivity(ActivityBasics activityBasics, PrizeDrawActivityPoolBonusTaypEnum bonusType, List<PrizeDrawActivityRewards> rewardList, List<ActivityTaskDTO> activityTasks);

    /**
     * 瓜分活动详情
     * @param id
     * @return
     */
    AdminCarveUpActivityDetailsVO carveUpActivityDetailsById(Long id);

    /**
     * 获取需要开奖数据
     * @param prizeDrawActivityTypeEnum
     * @return
     */
    List<ActivityBasics> getLotteryDataByType(PrizeDrawActivityTypeEnum prizeDrawActivityTypeEnum);

    /**
     * 获取活动的参与数据
     * @param activityId
     * @return
     */
    ParticipationDataVO getPageSecondaryMarketCollection(Long activityId);

    /**
     * 获取中奖数据
     * @param activityId
     * @param page
     * @return
     */
    IPage<LotteryDataPageVO> lotteryDataPage(Long activityId,String userTel,String lotteryDrawResultVar,String typeName, Page page);

    /**
     * 修改奖励状态为已拦截
     * @param id
     */
    void updateRewardsStatus(Long id,PrizeDrawActivitySettleStatisEnum status);

    ActivityBasics getById(Long activityId);
    IPage<ActivityRecordVO> activityRecord(Page page);
    IPage<ActivationRecordVO> activationRecord(ActivationRecordDTO activationRecordDTO);
    void sort(Long id, Integer sort);

    /**
     * 新增瓜分活动奖池配置
     * @param prizeDrawActivityPools
     */
    void addPrizeDrawCctivityPool(List<PrizeDrawActivityPool> prizeDrawActivityPools);

    /**
     * 获取活动列表
     * @return
     */
    List<ActivityBasicsListVO> activityBasicsList();

    /**
     * 查看签到活动数据-获取日参与统计数据
     * @param activityBasicsId
     * @return
     */
    ParticipationDateDataVO dayStatisticalData(Long activityBasicsId);

    /**
     * 用户签到
     * @param id
     */
    Boolean userSignIn(Long id,UserInfo user);
    Boolean userSignIn(Long signInActivityId, String signInDate, Integer signInDay, UserInfo user);

    /**
     * 用户补签
     * @param id
     * @param supplementarySignatureCardDayNum
     * @param user
     */
    void userSupplementarySignIn(Long id, Integer supplementarySignatureCardDayNum,UserInfo user);

    /**
     * 获取活动详情内容 签到详情内容
     * @param id
     * @param user
     * @return
     */
    SignInActivityBasicsDetailsVO signInDetailsById(Long id, UserInfo user);

    void testDate();
}
